#ifndef POINTERCOMMON
#define POINTERCOMMON
using namespace std;

class PointerCommon{
	public:
		template <class T>
		static void ptrIncreaseSize(T*&,int,int);		
		
	private:					
		
 };
template <class T>
void PointerCommon::ptrIncreaseSize(T *&pOldStr,int oldsize,int newsize){
	if(oldsize==newsize)return;
	T *pNewStr=new T[newsize];	
	if(oldsize<newsize){
		for(int i=0;i<oldsize;i++){			
			pNewStr[i]=pOldStr[i];
		}		
	}
	else{
		for(int i=0;i<newsize;i++){
			pNewStr[i]=pOldStr[i];			
		}		
	}	
	delete[] pOldStr;
	pOldStr=pNewStr;
}
#endif
